package com.mydemo.temp;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * 商户交易订单对账状态
 *
 * @author jianghaiyang 2021/3/11 11:34
 */
@AllArgsConstructor
@Getter
public enum MerchantTradeCompareStatusEnum {

    CONSISTENT("1", "一致"),

    KJT_MORE("2", "支付通道多"),

    MERCHANT_MORE("3", "业务系统多");

    private String code;

    private String message;

    public static MerchantTradeCompareStatusEnum parse(String code) {
        return Arrays.stream(MerchantTradeCompareStatusEnum.values()).filter(item -> Objects.equals(item.getCode(), code))
                .findAny().orElse(null);
    }
}
